package com.zhaojindong.ioc.component.register.first;

import com.zhaojindong.ioc.component.common.model.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * component register
 * by using @Configuration and @Bean register component in the container
 */
@Configuration
public class FirstConfig {

    @Bean(value = "person")
    public Person getPerson() {
        return new Person("tom", 45);
    }
}
